﻿using System;
using MaLu.Data;
using Malu.WebTemplates;
using Wicresoft.Framework.Organization;
using System.Configuration;
using System.Web.UI;

namespace MaLu.Common
{
    public class PUserControl : UserControl
    {
        private IDbProvider provider = null;
        protected IDbProvider Provider
        {
            get
            {
                if (provider == null)
                {
                    provider = ProviderManager.Factory.CreateDbProvider();
                    provider.Open();
                   
                }
                return provider;
            }

        }
        public int RecordID
        {
            get
            {
                if (Request["ID"] != null)
                    return int.Parse(Request["ID"]);
                if (ViewState["RecordID"] == null)
                    ViewState["RecordID"] = 0;
                return (int)ViewState["RecordID"];
            }
            set
            {
                ViewState["RecordID"] = value;
            }
        }


    }
}
